package cn.com.w.bootdemo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 读取maven的pom.xml文件变量settings.xml文件属性
 * (xml文件变量settings与pom属性同理,用户使用以settings.开头的属性引用settings.xml文件中的XML元素值)
 *
 */
@Component
@ConfigurationProperties(prefix = "meta")
@PropertySource(value = {"classpath:config/metadata.properties"}, ignoreResourceNotFound=false,
        encoding="UTF-8",
        name="metadata.properties")
public class MetadataConfig {

    private String path;

    private String name;

    private String version;

    private String filePath;

    private String startTime;

    private String mavenPath;

    private String encoding;

    private String mainClass;

    public String getMainClass() {
        return mainClass;
    }

    public void setMainClass(String mainClass) {
        this.mainClass = mainClass;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public String getMavenPath() {
        return mavenPath;
    }

    public void setMavenPath(String mavenPath) {
        this.mavenPath = mavenPath;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    @Override
    public String toString() {
        return "MetadataConfig{" +
                "path='" + path + '\'' +
                ", name='" + name + '\'' +
                ", version='" + version + '\'' +
                ", filePath='" + filePath + '\'' +
                ", startTime='" + startTime + '\'' +
                ", mavenPath='" + mavenPath + '\'' +
                ", encoding='" + encoding + '\'' +
                ", mainClass='" + mainClass + '\'' +
                '}';
    }
}
